import request from '@/utils/request'

/* *
 * 获取商品列表数据
 */
export const getGoodsList = params =>
  request({
    url: 'goods',
    params
  })

/* *
 * 删除商品
 */
export const deleteGoodsById = id =>
  request({
    method: 'DELETE',
    url: `goods/${id}`
  })

/* *
 * 添加商品
 */
export const addGoods = data =>
  request({
    method: 'POST',
    url: 'goods',
    data
  })
